package com.yimi.policyservice.service;

import com.github.pagehelper.Page;
import com.yimi.policyservice.dto.policycomminsure.PolicyComminsureBean;
import com.yimi.policyservice.dto.policycomminsure.PolicyComminsureItemDto;
import com.yimi.policyservice.dto.policycomminsure.PolicyComminsureItemPriceDto;
import com.yimi.policyservice.dto.policycomminsure.PolicyComminsureProductDto;
import com.yimi.policyservice.entity.base.policy.PolicyComminsureProduct;
import com.yimi.policyservice.entity.base.system.SysUser;
import com.yimi.policyservice.param.product.ComminsureParam;

import java.util.List;

public interface PolicyComminsureService {

    /**
     * 创建商保项目
     * @param bean
     * @param user
     * @return
     */
    PolicyComminsureProduct create(PolicyComminsureBean bean, SysUser user);

    /**
     * 修改商保项目
     * @param bean
     * @param id
     * @param user
     */
    void update(PolicyComminsureBean bean,String id,SysUser user);

    /**
     * 搜索
     * @param companyId
     * @param productId
     * @return
     */
    Page<PolicyComminsureProductDto> search(ComminsureParam comminsureParam);

    /**
     * 获取所有
     * @return
     */
    List<PolicyComminsureProductDto> getAll();

    /**
     * 获取所有 带权限
     * @return
     */
    List<PolicyComminsureProductDto>  getAllByPermission(String userId);
    /**
     * 批量删除
     * @param ids
     */
    void delete(List<String> ids);

    /**
     * 获取单个
     * @param id
     * @return
     */
    PolicyComminsureBean findOne(String id);

    List<PolicyComminsureItemDto> findByproductId(String id);

    void setProice( List<PolicyComminsureItemPriceDto> bean,String productId);

    List<PolicyComminsureItemPriceDto> getProice(String id);
}
